//index.js
//获取应用实例
var app = getApp()
Page({
  data: {
    flashData:['http://img.hb.aicdn.com/5fd293d7bc4cdcf1f2a733164becebd6a5ee44e41d6ad-9tqEK8_fw658','http://img.hb.aicdn.com/bcbb5f086b6b85ec587d3053cb1da35e33882cec1ee1d8-xNMFlU_fw658','http://img.hb.aicdn.com/d7f7ffed80c4ae554e43f660dbe5baf767a0e53b159051-LiWdwH_fw658','http://img.hb.aicdn.com/7f97962e713cb335c1ed7c7b110459a0fc611cc7195334-SYUmnn_fw658'],
    userInfo: {},
    btnImg:[
      {img:'../img/1-1.png' , name:'心理',url:'xinli'},
      {img:'../img/1-2.png' , name:'娱乐',url:'yule'},
      {img:'../img/1-3.png' , name:'好玩',url:'discuz'},
      {img:'../img/1-4.png' , name:'更多',url:'more'},
      {img:'../img/1-5.png' , name:'塔罗牌',url:'more'},
      {img:'../img/1-6.png' , name:'名字解密',url:'more'}
    ],
    news:[
      {
        id:1,
        img:'http://img.hb.aicdn.com/72dc5d3f404c7a477a298824ba9c3d37bfc407da15d6f-jaXjaw_fw658',
        content:'百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图'
      },
      {
        id:2,
        img:'http://img.hb.aicdn.com/ae0e1716baa4015df207cedf15188bc574da0dae108c19-VO2wOA_fw658',
        content:'百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图'
      },
      {
        id:3,
        img:'http://img.hb.aicdn.com/e6c128899ba606cac75f599b1144632dae73217f7c2b2-kznWmH_fw658',
        content:'百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图'
      },
      {
        id:4,
        img:'http://img.hb.aicdn.com/2b6012af949649befe42775bcc1e2a1dde8366c95049-ICVTIz_fw658',
        content:'百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图百万出众网友，用花瓣保存喜欢的图'
      }
    ]

  },
  //事件处理函数
  bindViewTap: function() {
    console.log(2);return;
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  aaa:function(e){
    console.log(1);
  },
  onLoad: function () {
    console.log('onLoad')
    var that = this
    //调用应用实例的方法获取全局数据
    app.getUserInfo(function(userInfo){
      //更新数据
      that.setData({
        userInfo:userInfo
      })
    })
  }
})
